package com.banciyuan.bcywebview.biz.main.mainpage.timeline.viewholder;

import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

import com.banciyuan.bcywebview.R;

import de.greenrobot.daoexample.model.Timeline;

/**
 * Created by squall on 2017/6/22.
 */

public class GridDailyNoPicHolder extends RecyclerView.ViewHolder {

    public TextView mIntro;

    public GridDailyNoPicHolder(View itemView) {
        super(itemView);

        mIntro = (TextView) itemView.findViewById(R.id.item_intro);
    }

    public void setGridDailyNoPic(GridDailyNoPicHolder gridDailyNoPicHolder, Timeline mItem, View.OnClickListener onClickListener) {
        if (!TextUtils.isEmpty(mItem.getPlain())) {
            gridDailyNoPicHolder.mIntro.setText(Html.fromHtml(mItem.getPlain()));
        }
        gridDailyNoPicHolder.itemView.setOnClickListener(onClickListener);
    }
}
